<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    max-height="800">
    <el-table-column
      fixed
      prop="date"
      label="日期"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="80">
    </el-table-column>
    <el-table-column
      prop="province"
      label="省份"
      width="80">
    </el-table-column>
    <el-table-column
      prop="city"
      label="市区"
      width="80">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址"
      width="400">
    </el-table-column>
    <el-table-column
      prop="account"
      label="昵称"
      width="100">
    </el-table-column>
    <el-table-column
      prop="password"
      label="密码"
      width="120">
    </el-table-column>
    <el-table-column
      prop="mobile"
      label="手机号"
      width="130">
    </el-table-column>
    <el-table-column
      prop="zip"
      label="邮编"
      width="120">
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      width="120">
      <template slot-scope="scope">
        <el-button
          @click.native.prevent="deleteRow(scope.$index, tableData)"
          type="text"
          size="small">
          移除
        </el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    methods: {
      deleteRow(index, rows) {
        rows.splice(index, 1);
      }
    },
    data() {
      return {
        tableData: [{
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        {
          date: '2016-05-03',
          name: '何兰',
          province: '陕西',
          city: '安康',
          address: '陕西安康江滨路路369号',
          account:'秋风叶落',
          password:'123456',
          mobile:'15369457825',
          zip: 200333
        },
        ]
      }
    }
  }
</script>